﻿using System;
using System.Runtime.CompilerServices;
using System.Timers;

namespace AutoR.Models
{
	// Token: 0x020001ED RID: 493
	public class DockInfo : BasicDockInfo
	{
		// Token: 0x17000323 RID: 803
		// (get) Token: 0x06000AE1 RID: 2785 RVA: 0x0006CC67 File Offset: 0x0006AE67
		// (set) Token: 0x06000AE2 RID: 2786 RVA: 0x0006CC70 File Offset: 0x0006AE70
		public int shipType
		{
			[CompilerGenerated]
			get
			{
				return this.<shipType>k__BackingField;
			}
			[CompilerGenerated]
			set
			{
				if (this.<shipType>k__BackingField == value)
				{
					return;
				}
				this.<shipType>k__BackingField = value;
				this.OnPropertyChanged(<>PropertyChangedEventArgs.IsEmpty);
				this.OnPropertyChanged(<>PropertyChangedEventArgs.OutText);
				this.OnPropertyChanged(<>PropertyChangedEventArgs.shipType);
			}
		}

		// Token: 0x17000324 RID: 804
		// (get) Token: 0x06000AE3 RID: 2787 RVA: 0x0006CCB3 File Offset: 0x0006AEB3
		public bool IsEmpty
		{
			get
			{
				return this.shipType == 0;
			}
		}

		// Token: 0x17000325 RID: 805
		// (get) Token: 0x06000AE4 RID: 2788 RVA: 0x0006CCC0 File Offset: 0x0006AEC0
		public string OutText
		{
			get
			{
				if (!this.IsEmpty)
				{
					return string.Format("剩: {0:00}:{1:00}", this.Span.Hours, this.Span.Minutes);
				}
				return "空";
			}
		}

		// Token: 0x17000326 RID: 806
		// (get) Token: 0x06000AE5 RID: 2789 RVA: 0x0006CD0B File Offset: 0x0006AF0B
		// (set) Token: 0x06000AE6 RID: 2790 RVA: 0x0006CD14 File Offset: 0x0006AF14
		public TimeSpan Span
		{
			[CompilerGenerated]
			get
			{
				return this.<Span>k__BackingField;
			}
			[CompilerGenerated]
			set
			{
				if (TimeSpan.Equals(this.<Span>k__BackingField, value))
				{
					return;
				}
				this.<Span>k__BackingField = value;
				this.OnPropertyChanged(<>PropertyChangedEventArgs.OutText);
				this.OnPropertyChanged(<>PropertyChangedEventArgs.Span);
			}
		}

		// Token: 0x06000AE7 RID: 2791 RVA: 0x0006CD4F File Offset: 0x0006AF4F
		public DockInfo()
		{
			new Timer
			{
				Enabled = true,
				Interval = 20000.0
			}.Elapsed += delegate(object o, ElapsedEventArgs e)
			{
				this.Span = ((base.endTime > DateTime.Now) ? (base.endTime - DateTime.Now) : TimeSpan.Zero);
			};
		}
	}
}
